package org.xhy.quickstarter.holder;

/**
 * @description:
 * @Author: Xhy
 * @CreateTime: 2023-11-13 13:44
 */
public class UserHolder {

    private static ThreadLocal<Integer> integerThreadLocal = new ThreadLocal<>();

    public static void set(Object userId){
        integerThreadLocal.set(Integer.parseInt(userId.toString()));
    }
    public static Integer get(){
        return integerThreadLocal.get();
    }
    public static void remove(){
        integerThreadLocal.remove();
    }
}
